import 'package:json_annotation/json_annotation.dart';

part 'point_exchange_account.g.dart';

@JsonSerializable()
class PointExchangeAccount {
  final String name;
  final String accountType;
  final double balance;
  final String exchangeRatio; // 兑换比例， 格式如：m:n，其中m为兑出积分数量，n为兑入积分数量
  final String ratioDescription; // 兑换比例描述
  final int outAmountUnit; // 兑出额度的单位数量。 即兑出额度必须是单位数量的整数倍

  PointExchangeAccount(
    this.name,
    this.accountType,
    this.balance,
    this.exchangeRatio,
    this.ratioDescription,
    this.outAmountUnit,
  );

  factory PointExchangeAccount.fromJson(Map<String, dynamic> json) =>
      _$PointExchangeAccountFromJson(json);

  Map<String, dynamic> toJson() => _$PointExchangeAccountToJson(this);
}
